import { ElMessage, ElMessageBox } from 'element-plus'
export function handleConfirmDelete(title) {
  return new Promise((resolve, reject) => {
    ElMessageBox.prompt('确定删除该数据？请输入安全码校验。', '提示', {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      inputPattern: /^HATI-HATI$/,
      inputErrorMessage: '请输入正确格式的安全校验码！'
    })
      .then(({ value }) => {
        resolve(value)
      })
      .catch(() => {
        reject()
      })
  })
}
